package exttable.view;

import utils.Localisation;

/**
 * Created by IntelliJ IDEA.
 * User: Admin
 * Date: Jan 13, 2010
 * Time: 12:08:19 AM
 * To change this template use File | Settings | File Templates.
 */
public class ViewType extends ViewLocales {
    private final String type;

    public static class Build implements IBuilder {
        private String type;
        private String nameRu;
        private String nameEn;
        private String nameKz;

        public Build type(String t) {
            type = t;
            return this;
        }

        public Build nameRu(String n) {
            nameRu = n;
            return this;
        }

        public Build nameEn(String ne) {
            nameEn = ne;
            return this;
        }

        public Build nameKz(String ne) {
            nameKz = ne;
            return this;
        }


        public ViewType build() {
            return new ViewType(this);
        }
    }

    public ViewType(Build build) {
        type = build.type;
        setNameRu(build.nameRu);
        setNameEn(build.nameEn);
        setNameKz(build.nameKz);
    }

    public String getType() {
        return type;
    }

    @Override
    public String toString() {
        return Localisation.getMsg(this);
    }


}
